package com.twu.biblioteca.menuoptions;

import com.twu.biblioteca.LibraryManager;
import com.twu.biblioteca.TerminalPrintUtility;

/**
 * Created by olga on 7/06/14.
 */
public class ReturnMovieOption extends MenuOption
{
    private static final String SUCCESS_MSG = "Thank you for returning the movie.";
    private static final String FAILURE_MSG = "That is not a valid movie to return.";

    public ReturnMovieOption()
    {
        super("Return a movie", null);

        requestTitle = "Please enter movie details";
        titleRequestString = "Movie title: ";
        creatorRequestString = "Movie director: ";
        yearRequestString = "Release year: ";
    }

    public void action(LibraryManager libraryManager)
    {
        getUserInputValues();
        printSuccessOrFailure( libraryManager.returnMovie(getTitle(),getCreator(),getYear()), SUCCESS_MSG, FAILURE_MSG );
    }
}
